package com.fun.base;

import java.util.HashMap;
import java.util.Map;

import android.app.Application;
import android.content.Context;
import android.telephony.TelephonyManager;

public class ExtContext extends Application{

	private Map<String, Object> attributes = null; 
	private TelephonyManager mTelephonyMgr = null;
	private Context context = null;
	private String phoneNo = null;
	private final String companyId = "COMP00000";

	@Override
	public void onCreate() {
		super.onCreate();
		context = getApplicationContext();
		attributes = new HashMap<String, Object>();
		mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
		phoneNo = mTelephonyMgr.getLine1Number();
		
	}

	public Object getAttribute(String key){
		return attributes.get(key);
	}
	
	public void setAttribute(String key, Object value){
		attributes.put(key, value);
	}

	public String getPhoneNo() {
		return phoneNo;
	}

	public String getCompanyId() {
		return companyId;
	}
}
